package org.fastsyncer.common.entity;

import java.io.Serializable;

public class Page implements Serializable {

    private static final long serialVersionUID = 3991498706394908461L;

    /**
     * 页数
     */
    private int pageIndex = 1;
    
    /**
     * 页大小
     */
    private int pageSize = 5;
    
    /**
     * 总页数
     */
    private int pageNumber;
    
    /**
     * 总条数
     */
    private int pageTotal;

    /**
     * 数据
     */
    private Object value;

    public Page(int pageIndex, int pageSize, int pageTotal) {
        super();
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.pageTotal = pageTotal;
        pageNumber = (pageTotal % pageSize == 0) ? pageTotal / pageSize : pageTotal / pageSize + 1;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    
}
